home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 4
/
Mac Giga-ROM 4.0 - 1993.toast
/
FILES
/
DEV
/
I-Z
/
SysAlerts.cpt
/
SysAlertsDoc
< prev
next >
Wrap
Internet Message Format
|
1985-03-07
|
3KB
Date: Sun 3 Mar 85 12:41:15-PST
From: Gustavo Fernandez <FERNANDEZ@SU-SCORE.ARPA>
Subject: Programmers' Deep Shit Alerts
Anyone who has read the system error handler section of Inside Mac has
seen the 'system alerts' window which was supposedly for programmers
while the bomb we all know and love was for naive users.
Unfortunately, Apple never released the programmers' alerts.
Having a very old version of the system (october '83) from which I
was able to grab such goodies as the Monkey, etc, I decided to try to
bring over the old deep shit alerts as well. (That's what they're
called!)
I had to do a complete disassembly of the file as several updates
had been made since then. I then merged my disassembly with the
published source of the user alerts (Lisa workshop local/init2.text)
The results are now stored in <info-mac>sysalerts.asm (assembly
source) and <info-mac>sysalerts.hqx (BINHEX 4.0 file of resource file
sysalerts containing a single INIT 2 resource to replace the existing
INIT 2 in the system folder - Use REDIT.)
The programmers' alerts have the following advantages...
1) They display the error message as well as the error code. (ID=28 is
displayed as "Stack overflow," etc.)
2) They give a register dump of A0-A7/D0-D7 and PC.
3) There is a FINDER button that does an ExitToShell call as well as
the usual restart and resume buttons.
They have the following disadvantages...
1) They are defenitely NOT for naive users. The register dump is ugly.
The error messages migh either scare people or make thim jump to
conclusions
2) The FINDER button may not always work. Currently it does the same
as the RESTART button if the ExitToShell trap is patched. (Both the
switcher and Hyper do this.)
3) They take up almost 4 times as much memory in the system heap than
do the user alerts. I have yet to try these out on a 128K mac where
the system heap is a lot smaller.
I took a few liberties and added a few things to the code.
1) The register names are displayed as well as their values. (ie
D0=xxxxxx...)
2) Some of the error messages have been changed to reflect their true
meaning in a Mac environment (eg Line 1111 exception changed to Fxxx
Breakpoint.)
Some other errors which are nearly impossible to create (such as
bus error or privelige exception) were deleted to save memory.
3) The grayed out RESUME button, which was faked in by the user
alerts, and nonexistent in the system alerts, was added for the sake of
compatibility.
Some memory can be reclaimed by deleting subroutine PlotGrayBut and
its single call at the beginning of routine p4. This will make this
button appear ONLY when resume is enabled.
4) Certain parts of the display were shifted slightly
5) The code now comforms to the current conventions which have changed
since October, '83.
Have Fun and Happy Hacking.
Gus Fernandez
FERNANDEZ@SU-SCORE
- -------
Return-Path: <FERNANDEZ@SU-SCORE.ARPA> Date: Mon 4 Mar 85 23:01:34-PST
From: Gustavo Fernandez <FERNANDEZ@SU-SCORE.ARPA> Subject: Re: your
D--- Sh-- alerts codes. To: INFO-MAC-REQUEST@SUMEX-AIM.ARPA
To install the alerts, simply use RMOVER or the Resource editor to
replace the INIT 2 resource in the system wwith the new one.
Gus